{include file="admin/public/header" /}
<style type="text/css">
    #content-main{padding: 5px;}
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content">
       <div class="row" style="background:#fff;">
           <div class="col-sm-3">
                <div class="ibox float-e-margins">
                    <div class="ibox-content mailbox-content">
                        <div class="file-manager">
                         <!-- <div data-toggle="buttons-checkbox" class="btn-group">
                                    <a href="javascript:;" url="/" name="结构列表" class="btn btn-primary frAlert" type="button"><i class="fa fa-bars"></i> 分组列表</a>
                                    <a href="javascript:;" url="/" name="新建组织结构" class="btn btn-primary frAlert" type="button"><i class="fa fa-sticky-note"></i> 新建分组</a>
                                  
                                </div> -->
                         
                            <div class="space-25"></div>
                            <h5>分类</h5>
                            <ul class="folder-list m-b-md" style="padding: 0">
                            {volist name="group" id="v"}
                              <li class="active" id="lefList">   
                                <p style="padding-top:15px;"><i class="fa   {if condition="$v['group_id']==$group_id"}fa-check-square{else}fa-square-o{/if}"></i> <i class="fa fa-file-text-o"></i> {$v.group_name}
                                <a style="padding:5px 10px;margin-right:5px;" class="cmzbtn label label-success pull-right"></a>
                                <a href="{:url('admin/user/index',['group_id'=>$v['group_id']])}" style="padding:5px 10px;margin-right:5px;" class="cmzbtn label label-primary pull-right">成员:共({$v.count})人</a>
                                </p>
                            </li>
                            {/volist}
                                
                            </ul>
                          

                            
                            <div class="clearfix"></div>
                               
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-9 animated fadeInRight">
                <div class="mail-box-header">

                  
                    <h2>
                    成员列表
                </h2>
                   <div class="mail-tools tooltip-demo m-t-md">
                        <div class="btn-group pull-right">
                            <button class="btn btn-white btn-sm"><i class="fa fa-arrow-left"></i>
                            </button>
                            <button class="btn btn-white btn-sm"><i class="fa fa-arrow-right"></i>
                            </button>

                        </div>
                        <?php if($group_id>0){ ?>
                        <a href="javascript:;" url="{:url('admin/user/edit')}" name="新建成员" class="frAlert btn btn-white btn-sm" data-toggle="tooltip" data-placement="left"><i class="fa fa-sticky-note"></i> 新建用户</a>
                        <a href="javascript:;" url="/" name="新建成员" class="frAlert btn btn-white btn-sm" data-toggle="tooltip" data-placement="left"><i class="fa fa-sticky-note"></i> 组授权</a>
                        <?php } ?>


                    </div>
                </div>
                 <div class="ibox-content">
                        {if condition="$users"}
                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>图片</th>
                                    <th>姓名</th>
                                    <th>邮箱</th>
                                    <th>会员组</th>
                                     <!-- <th>系统组</th> -->
                                     <th>注册时间</th>
                                     <th>最后活跃</th>
                                     <th>在线时长</th>
                                     <th>威望</th>
                                     <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                   
                               {volist name="users" id="v"}
                                    <tr>
                                    <td>{$v.uid}</td>
                                        <td class="client-avatar"><img src="{$Think.__STATIC__}{$v.avatar_file}" alt="{$v.user_name}"> </td>
                                        <td><a class="client-link" href="#contact-1" data-toggle="tab">{$v.user_name}</a>
                                        </td>
                                        <td> {$v.email}</td>
                                        <td class="contact-type"> </i>
                                        </td>
                                        <!-- <td><span class="label label-primary"></span></td> -->
                                        <td class="client-status"><span class="label label-default label-outline">{:date('Y-m-d',$v['reg_time'])}</span></td>
                                        <td class="client-status"><span class="label label-default label-outline">{:date('Y-m-d',$v['last_login'])}</span></td>
                                        <td class="client-status"><span class="label label-default label-outline">{:date('Y-m-d',$v['online_tim'])}</span></td>
                                        <td class="client-status"><span class="label label-default label-outline">{$v.reputation}</span></td>
                                         <td class="client-status">   
                                         <a url="{:url('admin/user/edit')}?id={$v.uid}" class="btn btn-primary btn-xs frAlert" >修改</a>
                                        <?php if($v['uid']!=1){ ?>
                                        <a class="btn btn-danger btn-xs cmzdel" where="uid-{$v.uid}" table="users" >删除</a>
                                       <?php } ?>
                                       <!-- <td class="client-status"><span class="label label-primary">删除</span> -->
                                        </td>
                                    </tr>
                               
                                {/volist}
                         
                            </tbody>
                        
                        </table>
                        {else}
                            {if  condition="$group_id>0"}
                                 <h5 > <div class="alet alert-info" style="padding:20px;">此分组下面没有用户</div></h5>
                            {else}
                                <h5 > <div class="alet alert-danger" style="padding:20px;">请先选择分组</div></h5>
                            {/if}
                        {/if}

                    </div>
             
            </div>
        </div>
    </div>
{include file="admin/public/footer" /}